<template>
  <div class="p-2">
    <el-card>
      <template #header>
        <div class="card-header">
          <span>基础信息</span>
        </div>
      </template>
      <div class="row">
        <div class="col">
          <div class="label">
            企业名称：
          </div>
          <div class="value"> {{ agInfoData.name }} </div>
        </div>
        <div class="col">
          <div class="label">
            统一社会信用代码：
          </div>
          <div class="value"> {{ agInfoData.xyCode }} </div>
        </div>
        <div class="col">
          <div class="label">
            区域：
          </div>
          <div class="value"> {{ agInfoData.area }} </div>
        </div>
        <div class="col">
          <div class="label">
            实际经营地址：
          </div>
          <div class="value"> {{ agInfoData.address }} </div>
        </div>
      </div>
    </el-card>
    <!-- <el-card>
      <template #header>
        <div class="card-header">
          <span>企业介绍</span>
        </div>
      </template>
      <div class="main">
        <div class="company_header flex_jstart_acenter">
          <div class="logo">
            <img src="" alt="">
          </div>
          <div class="header_info">
            <div class="company_name">郑州互赢软件科技有限公司</div>
            <div class="company_dec">20人以下 | 河南省-郑州市南阳路101号</div>
          </div>
        </div>
        <div class="info">
          ...
        </div>
      </div>
    </el-card> -->
  </div>
</template>

<script setup name="EnterpriseInformation" lang="ts">
import api from '@/api/system/enterpriseInformation';
import { AgInfoVO } from '@/api/system/enterpriseInformation/types';
const agInfoData=ref<AgInfoVO>({})
const loading = ref(true);

/** 查询企业信息 */
const getInfoData = async () => {
  loading.value = true;
  const res = await api.getAgInfo();
  loading.value = false;
  agInfoData.value = res.data;
};
onMounted(() => {
  getInfoData(); // 查询企业信息
});
</script>

<style lang="scss" scoped>
.el-card{
  margin-bottom: 20px;
  &:last-child{
    margin-bottom: 0;
  }
}
.row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  .col {
    display: flex;
    justify-content: flex-start;
    width: 33%;
    padding: 8px;
    .label {
      width: 130px;
      text-align: right;
      color: #000;
    }
    .value {
      flex: 1;
      color: #666;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
}
.main{
  .company_header{
    .logo{
      width: 100px;
      height: 100px;
      margin-right: 15px;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .header_info{
      .company_name{
        font-size: 18px;
        color: #008adf;
      }
      .company_dec{
        padding-top: 10px;
        font-size: 14px;
        color: #666;
      }
    }
  }
  .info{
    margin: 30px 0 40px;
    font-size: 14px;
    color: #666;
    line-height: 2em;
  }
}
</style>
